package com.epam.Xml;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;

@XmlAccessorType(XmlAccessType.FIELD)
public class Hotel {

	public enum Feeding {
		HB, BB, AI
	}

	@XmlElement
	private String name;
	@XmlElement
	private int stars;
	@XmlElement
	private int capacity;
	@XmlElement
	private boolean tv;
	@XmlElement
	private boolean conditioning;
	@XmlElement
	private Feeding feeding;

	private static List<Hotel> hotels = new ArrayList<Hotel>();

	public Hotel() {

	}

	public Hotel(String name, int stars, int capacity, boolean tv,
			boolean conditioning, Feeding feeding) {
		super();
		this.name = name;
		this.stars = stars;
		this.capacity = capacity;
		this.tv = tv;
		this.conditioning = conditioning;
		this.feeding = feeding;
		hotels.add(this);
	}

	public static List<Hotel> getHotels() {
		return hotels;
	}

	public static void setHotels(Hotel hotel) {
		Hotel.hotels.add(hotel);
	}

	public static void hotelInit() {
		Hotel hilton = new Hotel("Hilton", 5, 3, true, true, Feeding.AI);
		Hotel rose = new Hotel("Rose", 3, 1, true, false, Feeding.BB);
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setStars(int stars) {
		this.stars = stars;
	}

	public void setCapacity(int capacity) {
		this.capacity = capacity;
	}

	public void setTv(boolean tv) {
		this.tv = tv;
	}

	public void setConditioning(boolean conditioning) {
		this.conditioning = conditioning;
	}

	public void setFeeding(Feeding feeding) {
		this.feeding = feeding;
	}

	public String getName() {
		return name;
	}

	public int getStars() {
		return stars;
	}

	public int getCapacity() {
		return capacity;
	}

	public boolean isTv() {
		return tv;
	}

	public boolean isConditioning() {
		return conditioning;
	}

	public Feeding getFeeding() {
		return feeding;
	}

}
